package com.example.ssrbac.service;

import com.example.ssrbac.dto.UserDTO;
import com.example.ssrbac.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;
import java.util.Set;

public interface UserService extends UserDetailsService {
    UserDTO createUser(UserDTO userDTO);
    UserDTO updateUser(Long id, UserDTO userDTO);
    void deleteUser(Long id);
    UserDTO getUserById(Long id);
    Page<UserDTO> getAllUsers(Pageable pageable);
    UserDTO assignRoles(Long userId, Set<Long> roleIds);
    User findByUsername(String username);
    User findById(Long id);
    List<User> findAll();
    User save(User user);
    void deleteById(Long id);
    void logout(String token);
    void forceLogout(String username);
} 